
********************************************************************************
***********************REPLICATION CODE*****************************************

*WERNER, BERTSOU AND MARIEN. From Losers' Consent to Winners' Restraint:
*Citizens Reactions to Accumulating Democratic Violations
*STUDY 2 AND 3


clear
use WernerBertsouMarien_2024_WinnersRestraint_S2S3_data.dta
ssc install g538schemes
set scheme 538 ///or set manually



*Figure 3: overview of treatment groups

logit appealdich i.treat_all
margins, at(treat_all=(1(1)6)) vsquish saving(F3_da, replace)
marginsplot, plot1opts(connect(i)) title("The decision should be appealed") ///
xlabel(1 `" "No flaws" "(winner)" "' 2 `" "1 flaw" "(winner)" "' ///
3 `" "2 flaws" "(winner)" "' 4 `" "3 flaws" "(winner)" "' ///
5 `" "4 flaws" "(winner)" "' 6 `" "4 flaws" "(loser)" "', labcolor(gs3)) ///
name(Figure3_appeal, replace) ylabel(0(0.2)1 , labcolor(gs3)) ///
yline(.5) ytitle(" ") xtitle(" ") legend(off) ///
graphregion(color(white)) ///
plotregion(margin(l=10 r=10)) 

logit unfairdich i.treat_all
margins, at(treat_all=(1(1)6)) vsquish saving(F3_fp, replace)
marginsplot, plot1opts(connect(i)) title("The process was unfair") ///
xlabel(1 `" "No flaws" "(winner)" "' 2 `" "1 flaw" "(winner)" "' ///
3 `" "2 flaws" "(winner)" "' 4 `" "3 flaws" "(winner)" "' ///
5 `" "4 flaws" "(winner)" "' 6 `" "4 flaws" "(loser)" "', labcolor(gs3)) ///
name(Figure3_unfair, replace) ylabel(0(0.2)1 , labcolor(gs3)) ///
yline(.5) ytitle(" ") xtitle(" ") legend(off) ///
graphregion(color(white)) ///
plotregion(margin(l=10 r=10))


graph combine  Figure3_unfair Figure3_appeal,  graphregion(fcolor(white)) xsize(7.5) imargin(small) iscale(1) saving(Figure3_combined, replace) 
graph export "Figure3_combined.png", replace


*Figure 4: Robustness check: For the treatment group W1flaw, we check if the different flaws have different effects

logit appealdich i.flawtype
margins, at(flawtype = (1(1)4))
marginsplot  , plot1opts(connect(i)) graphregion(color(white)) plotregion(margin(large)) xtitle(" ") ytitle("") ylabel(0(.2)1) title("Willingness to Appeal") xlabel(1 `" "exclude" "evidence""' 2 `" "involved" "financially" "' 3 `" "ban" "protest" "' 4 `" "deny media" "access" "' , labcolor(gs3)) name(Figure4_appeal, replace) 

logit unfairdich i.flawtype
margins, at(flawtype = (1(1)4))
marginsplot  , plot1opts(connect(i)) graphregion(color(white)) plotregion(margin(large)) xtitle(" ") ytitle("") ylabel(0(.2)1) title("Unfairness perceptions") xlabel(1 `" "exclude" "evidence""' 2 `" "involved" "financially" "' 3 `" "ban" "protest" "' 4 `" "deny media" "access" "' , labcolor(gs3)) name(Figure4_unfair, replace) 

graph combine Figure4_unfair Figure4_appeal, title(" ") graphregion(fcolor(white)) xsize(8) iscale(1) saving(Figure4_combined, replace)
graph export "Figure4_combined.png", replace


*Figure 5: Predicted probability of appealing a flawed process across issue importance among decision winners

*Migration
logit appealdich i.eflaw##i.issueimp
margins eflaw#i.issueimp if eflaw==1 
marginsplot , by(eflaw, label("")) byopts(title("Immigration")) yline(0.5) graphregion(color(white)) xtitle("Issue Importance") title(" ") ytitle("Willingness to appeal") name(Figure5_imm_appeal, replace) ylabel(0(.2)1) 


*Climate: meat tax
logit appealdich i.eflaw##i.issueimpTax 
margins eflaw#i.issueimpTax if eflaw==1 
marginsplot , by(eflaw, label("")) byopts(title("Meat and Dairy Tax")) yline(0.5) graphregion(color(white)) xtitle("Issue Importance") title(" ") ytitle("Willingness to appeal") name(Figure5_tax_appeal, replace) ylabel(0(.2)1) 


graph combine Figure5_imm_appeal Figure5_tax_appeal, title(" ") graphregion(fcolor(white)) xsize(8) iscale(1) saving(Figure5_combined, replace)
graph export "Figure5_combined.png", replace


*Figure 6: Subgroup analysis by party support (Labour/Conservative party)

logit appealdich i.treat_all if ge2019vote == 1
margins, at(treat_all=(1(1)6)) vsquish saving(F3_da, replace)
marginsplot, plot1opts(connect(i)) title("Conservative voters") ///
xlabel(1 `" "No flaws" "(winner)" "' 2 `" "1 flaw" "(winner)" "' ///
3 `" "2 flaws" "(winner)" "' 4 `" "3 flaws" "(winner)" "' ///
5 `" "4 flaws" "(winner)" "' 6 `" "4 flaws" "(loser)" "', labcolor(gs3)) ///
name(Figure6_conv, replace) ylabel(0(0.2)1 , labcolor(gs3)) ///
yline(.5) ytitle("Willingness to appeal") xtitle(" ") legend(off) ///
graphregion(color(white)) ///
plotregion(margin(l=10 r=10)) 

logit unfairdich i.treat_all if ge2019vote == 2
margins, at(treat_all=(1(1)6)) vsquish saving(F3_fp, replace)
marginsplot, plot1opts(connect(i)) title("Labour voters") ///
xlabel(1 `" "No flaws" "(winner)" "' 2 `" "1 flaw" "(winner)" "' ///
3 `" "2 flaws" "(winner)" "' 4 `" "3 flaws" "(winner)" "' ///
5 `" "4 flaws" "(winner)" "' 6 `" "4 flaws" "(loser)" "', labcolor(gs3)) ///
name(Figure6_labour, replace) ylabel(0(0.2)1 , labcolor(gs3)) ///
yline(.5) ytitle("Willingness to appeal") xtitle(" ") legend(off) ///
graphregion(color(white)) ///
plotregion(margin(l=10 r=10))

graph combine  Figure6_conv Figure6_labour,  graphregion(fcolor(white)) xsize(7.5) imargin(small) iscale(1) saving(Figure6_combined, replace) 
graph export "Figure6_combined.png", replace


////Appendix


*C1. Overview of average scores on the categorical dependent variables (1-6)

cibar DVappeal, over(treat_all) bargap(2) baropts(barwidth(0.7) color(538b) lstyle(none)) graphopts(title("The decision should be appealed") xlabel(1 `" "No flaws" "(winner)" "' 2 `" "1 flaw" "(winner)" "' 3 `" "2 flaws" "(winner)" "' 4 `" "3 flaws" "(winner)" "' 5 `" "4 flaws" "(winner)" "' 6 `" "4 flaws" "(loser)" "', labcolor(gs3)) name(Appendix_meanappeal,replace) ylabel(0(1)6 , labcolor(gs3)) ytitle(" ") legend(off) graphregion(color(white))) ciopts(lcolor(black)) 

cibar DVunfair, over(treat_all) bargap(2) baropts(barwidth(0.7) color(538b) lstyle(none)) graphopts(title("The process was unfair") xlabel(1 `" "No flaws" "(winner)" "' 2 `" "1 flaw" "(winner)" "' 3 `" "2 flaws" "(winner)" "' 4 `" "3 flaws" "(winner)" "' 5 `" "4 flaws" "(winner)" "' 6 `" "4 flaws" "(loser)" "', labcolor(gs3)) name(Appendix_meanfair,replace) ylabel(0(1)6, labcolor(gs3)) ytitle(" ") legend(off) graphregion(color(white))) ciopts(lcolor(black)) 

graph combine  Appendix_meanappeal Appendix_meanfair,  graphregion(fcolor(white)) xsize(8) imargin(small) iscale(1) saving(Appendix_mean, replace)`'

*C2. fairness perceptions issue importance
*Migration

logit unfairdich i.eflaw##i.issueimp
margins eflaw#i.issueimp if eflaw==1 
marginsplot , by(eflaw) byopts(title("Immigration")) yline(0.5) graphregion(color(white)) xtitle("Issue Importance") ytitle("Unfairness perceptions") name(Appendix_impp_fairm, replace) ylabel(0(.2)1) 


*Climate: meat tax
logit unfairdich i.eflaw##i.issueimpTax 
margins eflaw#i.issueimpTax if eflaw==1 
marginsplot , by(eflaw) byopts(title("Meat and Dairy Tax")) yline(0.5) graphregion(color(white)) xtitle("Issue Importance") ytitle("Unfairness perceptions") name(Appendix_impp_fairt, replace) ylabel(0(.2)1) 


graph combine Appendix_impp_fairm Appendix_impp_fairt, title(" ") graphregion(fcolor(white)) xsize(8) iscale(1) saving(Appendix_impp_fair, replace)


*C3. fairness perceptions ideological placement

*Economic redistribution
logit unfairdich i.eflaw##i.econredistr
margins eflaw#i.econredistr if eflaw==1 
marginsplot , by(eflaw) byopts(title(" ")) yline(0.5) graphregion(color(white) lwidth(large)) xtitle("Economically Right") ytitle("Unfairness perceptions") name(Appendix_econ_fair, replace) ylabel(0(.2)1) 


*Culturally conservative
logit unfairdich i.eflaw##i.cultLGfree
margins eflaw#i.cultLGfree if eflaw==1 
marginsplot , by(eflaw) byopts(title(" ")) yline(0.5) graphregion(color(white) lwidth(large)) xtitle("Culturally Conservative") ytitle("Unfairness perceptions")name(Appendix_cult_fair, replace) ylabel(0(.2)1) 

graph combine Appendix_econ_fair Appendix_cult_fair, title(" ") graphregion(fcolor(white)) xsize(8) iscale(1) saving(Appendix_id_fair, replace)


*C4. fairness perceptions party preference

cibar unfairdich if ge2019vote == 1, over(treat_all)  bargap(2) baropts(barwidth(0.7) color(538b) lstyle(none)) graphopts(title("Conservative voters") xlabel(1 `" "No flaws" "(winner)" "' 2 `" "1 flaw" "(winner)" "' 3 `" "2 flaws" "(winner)" "' 4 `" "3 flaws" "(winner)" "' 5 `" "4 flaws" "(winner)" "' 6 `" "4 flaws" "(loser)" "', labcolor(gs3)) name(Appendix_cons_fair,replace) ylabel(0(0.2)1 , labcolor(gs3)) yline(.5) ytitle(" ") legend(off) graphregion(color(white))) ciopts(lcolor(black)) 

cibar unfairdich if ge2019vote == 2, over(treat_all)  bargap(2) baropts(barwidth(0.7) color(538b) lstyle(none)) graphopts(title("Labour voters") xlabel(1 `" "No flaws" "(winner)" "' 2 `" "1 flaw" "(winner)" "' 3 `" "2 flaws" "(winner)" "' 4 `" "3 flaws" "(winner)" "' 5 `" "4 flaws" "(winner)" "' 6 `" "4 flaws" "(loser)" "', labcolor(gs3)) name(Appendix_lab_fair,replace) ylabel(0(0.2)1 , labcolor(gs3)) yline(.5) ytitle(" ") legend(off) graphregion(color(white))) ciopts(lcolor(black)) 


graph combine Appendix_cons_fair Appendix_lab_fair,  graphregion(fcolor(white)) xsize(8) imargin(small) iscale(1) saving(Appendix_vote_fair, replace)`'

*C5. fairness perceptions democratic views

cibar unfairdich if demviews == 1, over(treat_all)  bargap(2) baropts(barwidth(0.7) color(538b) lstyle(none)) graphopts(title("Democracy always best") xlabel(1 `" "No flaws" "(winner)" "' 2 `" "1 flaw" "(winner)" "' 3 `" "2 flaws" "(winner)" "' 4 `" "3 flaws" "(winner)" "' 5 `" "4 flaws" "(winner)" "' 6 `" "4 flaws" "(loser)" "', labcolor(gs3)) name(Appendix_dem1_fair,replace) ylabel(0(0.2)1 , labcolor(gs3)) yline(.5) ytitle(" ") legend(off) graphregion(color(white))) ciopts(lcolor(black)) 

cibar unfairdich if demviews == 2, over(treat_all)  bargap(2) baropts(barwidth(0.7) color(538b) lstyle(none)) graphopts(title("Democracy has to deliver") xlabel(1 `" "No flaws" "(winner)" "' 2 `" "1 flaw" "(winner)" "' 3 `" "2 flaws" "(winner)" "' 4 `" "3 flaws" "(winner)" "' 5 `" "4 flaws" "(winner)" "' 6 `" "4 flaws" "(loser)" "', labcolor(gs3)) name(Appendix_dem2_fair,replace) ylabel(0(0.2)1 , labcolor(gs3)) yline(.5) ytitle(" ") legend(off) graphregion(color(white))) ciopts(lcolor(black)) 


graph combine  Appendix_dem1_fair Appendix_dem2_fair,  graphregion(fcolor(white)) xsize(8) imargin(small) iscale(1) saving(Appendix_dem_fair, replace)`'


*C6. appeal ideological placement

*Economic redistribution
logit appealdich i.eflaw##i.econredistr
margins eflaw#i.econredistr if eflaw==1 
marginsplot , by(eflaw) byopts(title(" ")) yline(0.5) graphregion(color(white) lwidth(large)) xtitle("Economically Right") ytitle("Willingness to appeal") name(Appendix_econ_appeal, replace) ylabel(0(.2)1) 


*Culturally conservative
logit appealdich i.eflaw##i.cultLGfree
margins eflaw#i.cultLGfree if eflaw==1 
marginsplot , by(eflaw) byopts(title(" ")) yline(0.5) graphregion(color(white) lwidth(large)) xtitle("Culturally Conservative") ytitle("Willingness to appeal")name(Appendix_culture_appeal, replace) ylabel(0(.2)1) 

graph combine Appendix_econ_appeal Appendix_culture_appeal, title(" ") graphregion(fcolor(white)) xsize(8) iscale(1) saving(Appendix_id_appeal, replace)


*C7. appeal democratic views

cibar appealdich if demviews == 1, over(treat_all)  bargap(2) baropts(barwidth(0.7) color(538b) lstyle(none)) graphopts(title("Democracy always best") xlabel(1 `" "No flaws" "(winner)" "' 2 `" "1 flaw" "(winner)" "' 3 `" "2 flaws" "(winner)" "' 4 `" "3 flaws" "(winner)" "' 5 `" "4 flaws" "(winner)" "' 6 `" "4 flaws" "(loser)" "', labcolor(gs3)) name(Appendix_dem1_appeal,replace) ylabel(0(0.2)1 , labcolor(gs3)) yline(.5) ytitle(" ") legend(off) graphregion(color(white))) ciopts(lcolor(black)) 

cibar appealdich if demviews == 2, over(treat_all)  bargap(2) baropts(barwidth(0.7) color(538b) lstyle(none)) graphopts(title("Democracy has to deliver") xlabel(1 `" "No flaws" "(winner)" "' 2 `" "1 flaw" "(winner)" "' 3 `" "2 flaws" "(winner)" "' 4 `" "3 flaws" "(winner)" "' 5 `" "4 flaws" "(winner)" "' 6 `" "4 flaws" "(loser)" "', labcolor(gs3)) name(Appendix_dem2_appeal,replace) ylabel(0(0.2)1 , labcolor(gs3)) yline(.5) ytitle(" ") legend(off) graphregion(color(white))) ciopts(lcolor(black)) 


graph combine Appendix_dem1_appeal Appendix_dem2_appeal,  graphregion(fcolor(white)) xsize(8) imargin(small) iscale(1) saving(Appendix_dem_appeal, replace)


*C8. Effects on trust in parliament
//Diffuse support
//H5: The presence of procedural flaws decreases trust in parliament
//H5: β1<0

regress DVtrust eflaw
margins, at(eflaw =(0 1))  vsquish
marginsplot, plot1opts(connect(i)) graphregion(color(white)) ylabel(1(1)7) xtitle("Presence of flaws") ytitle("Trust in parliament") name(Appendix_trust, replace)


regress DVtrust i.nflaw
margins, at(nflaw =(0(1) 4))  vsquish
marginsplot, plot1opts(connect(i)) graphregion(color(white))  xtitle("Number of flaws") ytitle("Distrust/Trust") name(H5b, replace)

*C9. time

//Time
//H6: Decision winners will spend less time reading about the flaws of the process than decision losers
//H6: β1>0

regress page_p_proceduralflaws_timing winlos
margins, at(winlos =(0 1))  vsquish
marginsplot, plot1opts(connect(i)) graphregion(color(white))  xtitle("Winners vs Losers") ytitle("Time spent reading flaws") name(Time0, replace)
//overall
mean page_p_proceduralflaws_timing, over(treat_all)
cibar page_p_proceduralflaws_timing, over(treat_all) graphopts(title("Time spent reading flaws") name(Time1,replace))


*D1. CACE analysis
*compliance is defined as passing the recall check and is hence known in both treatment and control group

cibar appealdich if recall_correct==1, over(treat_all) bargap(2) baropts(barwidth(0.7) color(538b) lstyle(none)) graphopts(title("The decision should be appealed") xlabel(1 `" "No flaws" "(winner)" "' 2 `" "1 flaw" "(winner)" "' 3 `" "2 flaws" "(winner)" "' 4 `" "3 flaws" "(winner)" "' 5 `" "4 flaws" "(winner)" "' 6 `" "4 flaws" "(loser)" "', labcolor(gs3)) name(Appendix_CACEappeal,replace) ylabel(0(0.2)1 , labcolor(gs3)) yline(.5) ytitle(" ") legend(off) graphregion(color(white))) ciopts(lcolor(black)) 

cibar unfairdich if recall_correct==1, over(treat_all) bargap(2) baropts(barwidth(0.7) color(538b) lstyle(none)) graphopts(title("The process was unfair") xlabel(1 `" "No flaws" "(winner)" "' 2 `" "1 flaw" "(winner)" "' 3 `" "2 flaws" "(winner)" "' 4 `" "3 flaws" "(winner)" "' 5 `" "4 flaws" "(winner)" "' 6 `" "4 flaws" "(loser)" "', labcolor(gs3)) name(Appendix_CACEfair,replace) ylabel(0(0.2)1, labcolor(gs3)) yline(.5) ytitle(" ") legend(off) graphregion(color(white))) ciopts(lcolor(black)) 

graph combine  Appendix_CACEappeal Appendix_CACEfair,  graphregion(fcolor(white)) xsize(8) imargin(small) iscale(1) saving(Appendix_CACE, replace)


*D2. Separate Analysis for E1 Migration
cibar appealdich if Experiment==1, over(treat_all) bargap(2) baropts(barwidth(0.7) color(538b) lstyle(none)) graphopts(title("The decision should be appealed") xlabel(1 `" "No flaws" "(winner)" "' 2 `" "1 flaw" "(winner)" "' 3 `" "2 flaws" "(winner)" "' 4 `" "3 flaws" "(winner)" "' 5 `" "4 flaws" "(winner)" "' 6 `" "4 flaws" "(loser)" "', labcolor(gs3)) name(Appendix_migrationappeal,replace) ylabel(0(0.2)1 , labcolor(gs3)) yline(.5) ytitle(" ") legend(off) graphregion(color(white))) ciopts(lcolor(black)) 

cibar unfairdich if Experiment==1, over(treat_all) bargap(2) baropts(barwidth(0.7) color(538b) lstyle(none)) graphopts(title("The process was unfair") xlabel(1 `" "No flaws" "(winner)" "' 2 `" "1 flaw" "(winner)" "' 3 `" "2 flaws" "(winner)" "' 4 `" "3 flaws" "(winner)" "' 5 `" "4 flaws" "(winner)" "' 6 `" "4 flaws" "(loser)" "', labcolor(gs3)) name(Appendix_migrationunfair,replace) ylabel(0(0.2)1, labcolor(gs3)) yline(.5) ytitle(" ") legend(off) graphregion(color(white))) ciopts(lcolor(black)) 

graph combine  Appendix_migrationappeal Appendix_migrationunfair,  graphregion(fcolor(white)) xsize(8) imargin(small) iscale(1) saving(Appendix_migration, replace)


*D3. Separate Analysis for E2 Meat and dairy tax
cibar appealdich if Experiment==2, over(treat_all) bargap(2) baropts(barwidth(0.7) color(538b) lstyle(none)) graphopts(title("The decision should be appealed") xlabel(1 `" "No flaws" "(winner)" "' 2 `" "1 flaw" "(winner)" "' 3 `" "2 flaws" "(winner)" "' 4 `" "3 flaws" "(winner)" "' 5 `" "4 flaws" "(winner)" "' 6 `" "4 flaws" "(loser)" "', labcolor(gs3)) name(Appendix_taxappeal,replace) ylabel(0(0.2)1 , labcolor(gs3)) yline(.5) ytitle(" ") legend(off) graphregion(color(white))) ciopts(lcolor(black)) 

cibar unfairdich if Experiment==2, over(treat_all) bargap(2) baropts(barwidth(0.7) color(538b) lstyle(none)) graphopts(title("The process was unfair") xlabel(1 `" "No flaws" "(winner)" "' 2 `" "1 flaw" "(winner)" "' 3 `" "2 flaws" "(winner)" "' 4 `" "3 flaws" "(winner)" "' 5 `" "4 flaws" "(winner)" "' 6 `" "4 flaws" "(loser)" "', labcolor(gs3)) name(Appendix_taxunfair,replace) ylabel(0(0.2)1, labcolor(gs3)) yline(.5) ytitle(" ") legend(off) graphregion(color(white))) ciopts(lcolor(black)) 

graph combine Appendix_taxappeal Appendix_taxunfair,  graphregion(fcolor(white)) xsize(8) imargin(small) iscale(1) saving(Appendix_tax, replace)










